package ph.edu.ics.sp.graphisched;

import java.io.File;

import javax.swing.filechooser.FileFilter;

public class ExcelFilter extends FileFilter {

	public boolean accept(File f) {
		if (f.isDirectory()) {
			return true;
		}

		String extension = Utils.getExtension(f);
		if (extension != null) {
			if (extension.equals(Utils.xls)) {
				return true;
			} else {
				return false;
			}
		}

		return false;
	}

	@Override
	public String getDescription() {
		return "Excel 97-2003 Workbook (*.xls)";
	}
}
